package com.hbnu.service;

import com.hbnu.dao.OrderDao;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class OrderService {
//    @Autowired        //自动注入注解
    @Resource(name = "orderDao")     //Autowired和Resource都可以
    private OrderDao orderDao;
    @Value("JDi123456")
    private String orderNo;
    @Value("小米12,华为Mate,Phone15")
    private String[] orderPro;
    public void addOrder(){
        System.out.println("订单业务层....");
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String[] getOrderPro() {
        return orderPro;
    }

    public void setOrderPro(String[] orderPro) {
        this.orderPro = orderPro;
    }

}
